import Layout from '@/layout'

const channel = {
  path: '/channel',
  component: Layout,
  redirect: '/channel/channel-manage',
  name: 'Channel',
  meta: { title: '渠道管理', icon: 'channel' },
  alwaysShow: true,
  children: [
    {
      path: 'channel-manage',
      name: 'ChannelManage',
      component: () => import('@/views/channel/channel-manage/ChannelManage'),
      meta: { title: '渠道列表' }
    },
    {
      path: 'channelCreate/:type/:company?/:nickname?/:id?',
      name: 'ChannelCreate',
      component: () => import('@/views/channel/channel-manage/ChannelCreate'),
      meta: {
        title: '渠道',
        noCache: true,
        activeMenu: '/channel/channel-manage',
        edit: true
      },
      hidden: true
    },
    {
      path: 'ration-manage',
      name: 'RationManage',
      component: () => import('@/views/channel/ration-manage/RationManage'),
      meta: { title: '配量管理' }
    },
    {
      path: 'cost',
      name: 'costDetail',
      component: () => import('@/views/channel/cost'),
      meta: { title: '查看成本' },
      hidden: true
    },
    {
      path:
        'rationCreate/:type/:channelId?/:media?/:city?/:dayCount?/:weekCount?/:monthCount?/:id?',
      component: () => import('@/views/channel/ration-manage/RationCreate'),
      name: 'rationCreate',
      meta: {
        title: '配量',
        noCache: true,
        activeMenu: '/channel/ration-manage',
        edit: true
      },
      hidden: true
    },
    {
      path: 'channel-clients',
      name: 'ChannelClients',
      component: () => import('@/views/channel/channel-clients/ChannelClients'),
      meta: { title: '渠道客户' }
    }
  ]
}

export { channel }
